<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BackEndController
 *
 * @author KOI
 */
class BackEndController extends CController {

    public $layout = '//layouts/column2';
    public $menu = array();
    public $breadcrumbs = array();
    public function accessRules() {
        $rs = Resource::getAuthorByController(get_class($this));
        $rules =array(); 
        foreach ($rs as $action => $roles) {
            $rules[] = array('allow',
                'roles' => $roles[0]==NULL?array('super_admin'):$roles,
                'actions' => array($action),
                );
        }
        $rules[] = array('deny',
                'users' => array('*')
            );
        return $rules;
    }
    

    public function filters() {
        return array(
            'accessControl',
        );
    }

}
